﻿<cfsilent>
	<cfscript>
	
		
		event.setArg("pageTitle", "本科生管理 - 学分指导教师");

		
		sql = "SELECT 
			    a.tch_id, a.tch_name, 
			    (select count(*) from t_student b where b.tch_id = a.tch_id) countStu 
			    FROM t_teacher a 
			    WHERE a.point_manager = 1  
			    ORDER BY countStu desc,a.tch_name";
			    
		queryObj = new query( datasource=application.dnsSlave );
		
		rs_teacher = queryObj.execute( sql=sql ).getResult();
		
		currentTab = event.getArg("TabID", "labTeacher");
		
		passArgs = structNew();

	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('DEFAULT_EVENT')#</cfoutput>"><i class="mrs img btnPublish"></i><span class="uiButtonText">学生学籍管理</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 link"></i>本科生学分指导
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="administration">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labTeacher">class="active"</cfif> id="labTeacher" tabTarget="Teacher">学分指导教师</span>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>				
				</script>
			</div>
			
			
			<div id="Teacher" class="tabContent">
               
               	<div class="noticeBlock">
                	<div class="operation">
                        <a class="uiButton uiButtonSpecial" href="<cfoutput>#buildURL('studentByPointDownloadExcel', passArgs)#</cfoutput>"><i class="mrs img btnDownload"></i><span class="uiButtonText">下载教师指导本科生名单</span></a>
                    </div>
                            
					<h3>学分指导教师</h3>
					<p><span class="img icon16x16 message"></span>这里列出所有学分指导教师</p>
					<hr/>
				</div>
					
				<cfif rs_teacher.recordCount>

					<div class="clearfix">
                        <cfloop query="rs_teacher"  >
							<cfset structInsert( passArgs, "TCHID", rs_teacher.tch_id, true) />
							<div class="UISmallUserCard">
								<div class="cardContent">
									<a href="<cfoutput>#buildURL('studentByPoint', passArgs)#</cfoutput>"><img class="img" src="<cfoutput>#getProperty('cdnServer')#</cfoutput><cfoutput>#getContextRoot()#</cfoutput>/acadmicRes/assets/graphic/userSmall.png" style="background-image: url('<cfoutput>#getContextRoot()#</cfoutput>/acadmicManager/teacher/portrait/<cfoutput>#rs_teacher.tch_id#</cfoutput>.jpg');"></a>
									<div class="cardDetail">
										<h3><a href="<cfoutput>#buildURL('studentByPoint', passArgs)#</cfoutput>"><cfoutput>#rs_teacher.tch_name#</cfoutput></a> <span class="uid"></span></h3>
										<p>学生：<cfoutput>#rs_teacher.countStu#</cfoutput></p>
									</div>
								</div>
							</div>
						</cfloop>
					</div>
                         
					
				</cfif>
					
			</div>
			
		</li>
	</ul>
</div>

